<%@ page language="java"
	import="java.util.*,edu.cnu.tpts.bean.*,edu.cnu.tpts.dao.*,edu.cnu.tpts.dao.impl.*"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/authorize.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">



<html>
<head>
	<base href="<%=basePath%>">
    <title>admin</title>
    <link rel="stylesheet" type="text/css" href="/css/main.css">
</head>
<body>
<div id="header">

</div>

<div id="menu">
    <ul>

        <li><a hidefocus="hidefocus" href="student/showMessage.jsp">查询个人信息</a></li>         
         <li><a hidefocus="hidefocus" href="student/updateMessage.jsp">更新个人信息</a></li>
        <li><a hidefocus="hidefocus" href="student/showScore.jsp">查询个人成绩</a></li>
        <li><a hidefocus="hidefocus" href="student/showTeacher.jsp">查询教师信息</a></li>
        <li><a hidefocus="hidefocus" href="student/predict.jsp">成绩和能力预测</a></li>
        <li><a hidefocus="hidefocus" href="student/alarm.jsp">查看预警信息</a></li>
         <li><a hidefocus="hidefocus" href="quit.jsp">退出</a></li>
         	 <%@include file="/WEB-INF/date.jsp"%>
     </ul>
 
</div>

<div class="table">

		<table>
				<tr>
				<td>
					课程名称
				</td>
				<td>
					作业情况
				</td>
					<td>
					平时测验
				</td>
					<td>
					总成绩
				</td>
				
			</tr>
		
		<%
			Student stu = (Student) session.getAttribute("user");

			StudentDao stuDao = new StudentDaoImpl();
			List<StudentScore> scorelist = stuDao.findScores(stu.getId());
			//System.out.println(scorelist.size());
			for (int i = 0; i < scorelist.size(); i++) {
				StudentScore score = scorelist.get(i);
				String couresName = score.getCourseName();
				int taskScore = score.getTaskScore();
				int testScore = score.getTestScore();
				int totalScore = score.getTotalScore();
		%>
	
	
			<tr>
				<td><%=couresName%></td>
				<td><%=taskScore%></td>
				<td><%= testScore%></td>
				<td><%=totalScore%></td>
			</tr>




		<%
			}
		%>
				
		</table>
		

</div>

<div id="copyright">
    <div align="center">
        <font face="Tahoma, Verdana" color="#ffffff">Copyright &copy; 首都师范大学版权所有<br>

            地址：北京市西三环北路105号 100048&nbsp;&nbsp;&nbsp;&nbsp; E-mail: </font><font face="Tahoma, Verdana">

    </font>
    </div>

</div>

</body>
</html>
